<%@ page import="agentFree2.*, java.net.*,
 java.io.IOException,
 java.util.Date,
 java.util.logging.Logger,
 javax.jdo.PersistenceManager,
 javax.servlet.http.*,
 javax.jdo.Query,
 java.util.List" %>
<%

// ...
	PersistenceManager pm = PMF.get().getPersistenceManager();
    Query query = pm.newQuery(Agent.class);
 
    

    try {
        List<Agent> results = (List<Agent>) query.execute("Smith");
        out.println(results.size());
        if (!results.isEmpty()) {
            for (Agent e : results) {
            	
                out.println(e.getPhoneNumber()+"       "+e.getAgentName()+"       "+e.getUrl());
            }
        } else {
            // ... no results ...
        }
    } finally {
        query.closeAll();
    }
%>